package org.aries.cloud;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

//@EnableFeignClients(basePackages = "com.project.feign.client")
//@EnableDiscoveryClient
//@MapperScan("com.project.web.live.mapper")
@SpringBootApplication(scanBasePackages = {"org.aires"})
//@SpringBootApplication
public class ServiceApplication implements ApplicationRunner {

    public static final Logger log = LoggerFactory.getLogger(ServiceApplication.class);

    @Value("${spring.application.name}")
    private String applicationName;

    @Value("${spring.profiles.active}")
    private String profilesActive;

    public static void main(String[] args) {
        SpringApplication.run(ServiceApplication.class);
    }

    @Override
    public void run(ApplicationArguments args) {
        log.info("应用程序启动成功！applicationName={}，profilesActive={}", applicationName, profilesActive);
    }
}
